package com.hs.service.impl;
/*
 * @Author:iWeeper
 * @Date:2022/6/23 16:40
 * @Version:1.0
 * */

import com.hs.entity.Grade;
import com.hs.mapper.GradeMapper;
import com.hs.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

@Service
public class StudentServiceImpl implements StudentService {
    @Autowired
    private GradeMapper gradeMapper;

    @Override
    public List<Grade> findGradeListBySid(String sid) {
        return gradeMapper.findGradeListBySid(sid);
    }

    @Override
    public List<Map<String, Object>> queryEchartsByStudentId(Integer studentId) {
        return gradeMapper.queryEchartsByStudentId(studentId);
    }

    @Override
    public Integer countExamTime(String studentId) throws SQLException {
        return gradeMapper.countExamTime(studentId);
    }

    @Override
    public Double calAverageScore(String studentId) throws SQLException {
        return gradeMapper.calAverageScore(studentId);
    }

    @Override
    public Integer countFailTime(String studentId) throws SQLException {
        return gradeMapper.countFailTime(studentId);
    }

    @Override
    public Integer countTotalTime() throws SQLException {
        return gradeMapper.countTotalTime();
    }

    @Override
    public Double calAllAverageScore() throws SQLException {
        return gradeMapper.calAllAverageScore();
    }

    @Override
    public Integer examFind(String paperId, String studentId) throws SQLException {
        return gradeMapper.examFind(paperId,studentId);
    }
}
